home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / a / aplayerv1.3+keyfile.lha / APlayer / HDInstall < prev    next >
Text File  |  1995-05-26  |  39KB  |  1,297 lines

  1. ;**************************************************************************
  2. ;*                                                                        *
  3. ;*                 Installer Script For Accessible Player                 *
  4. ;*                                                                        *
  5. ;*                            Update 29/05-1995                           *
  6. ;*                                                                        *
  7. ;**************************************************************************
  8.  
  9. ;--------------------------------------------------------------------------
  10. ; Procedures
  11.  
  12. (procedure InstallLib
  13.     (working ("Testing %s" libname))
  14.     (copylib
  15.         (prompt ("Do you want to install the \"%s\"?" libname))
  16.         (help @copylib-help)
  17.         (source (tackon tempdir libname))
  18.         (dest libdest)
  19.         (confirm)
  20.     )
  21. )
  22.  
  23. (procedure DeleteAll
  24.     (if (exists deldir)
  25.         (foreach deldir "#?"
  26.             (delete (tackon deldir @each-name)
  27.                 (optional force)
  28.             )
  29.         )
  30.     )
  31. )
  32.  
  33. ;--------------------------------------------------------------------------
  34. ; ** Install Procedure
  35.  
  36. (procedure Install
  37.     (message "This version of APlayer is shareware. "
  38.              "Without registration you will miss some of APlayer "
  39.              "features. On how to register, read the guide.\n\n"
  40.              "If you still want to install press proceed else abort."
  41.     )
  42.  
  43.     (message "You are now about to install the APlayer program. "
  44.              "You will first be asked for all the different files "
  45.              "you can install and then this script will begin to "
  46.              "install the files."
  47.     )
  48.  
  49.     (set default-dest
  50.         (askdir
  51.             (prompt "Where do you want to make the APlayer drawer?")
  52.             (help @askdir-help)
  53.             (default @default-dest)
  54.         )
  55.     )
  56.     (set @default-dest default-dest)
  57.  
  58.  
  59.     (set fileflag
  60.         (askoptions
  61.             (prompt "Which files do you want to install in the "
  62.                     "\"APlayer\" drawer?")
  63.             (help @askoptions-help)
  64.             (choices
  65.                 "APlayer"
  66.                 "Commercial Picture"
  67.                 "Sheep module"
  68.             )
  69.         )
  70.     )
  71.  
  72.  
  73.     (set play
  74.         (askbool
  75.             (prompt "Do you want to install external players?")
  76.             (help "If you select yes, you can select between all the "
  77.                   "external players this version support. All the players "
  78.                   "will be stored in your \"LIBS:APlayer\" drawer.")
  79.         )
  80.     )
  81.  
  82.     (set playflag1 0)
  83.     (set playflag2 0)
  84.     (set playflag3 0)
  85.     (set playflag4 0)
  86.     (set playflag5 0)
  87.     (set playflag6 0)
  88.     (set playflag7 0)
  89.     (if play
  90.         (
  91.             (set playflag1
  92.                 (askoptions
  93.                     (prompt "Which external players do you want to install in "
  94.                             "your \"LIBS:APlayer\" drawer?")
  95.                     (help @askoptions-help)
  96.                     (choices
  97.                         "Action Amics"
  98.                         "DeliCustom"
  99.                         "Digital Mugician"
  100.                         "DSS"
  101.                         "FastTracker"
  102.                         "FastTracker 2.0"
  103.                         "Fred"
  104.                         "Face The Music"
  105.                     )
  106.                 )
  107.             )
  108.  
  109.             (set playflag2
  110.                 (askoptions
  111.                     (prompt "Which external players do you want to install in "
  112.                             "your \"LIBS:APlayer\" drawer?")
  113.                     (help @askoptions-help)
  114.                     (choices
  115.                         "Future Composer 1.0-1.3"
  116.                         "Future Composer 1.4"
  117.                         "Hippel-COSO"
  118.                         "Hippel"
  119.                         "IFF-8SVX"
  120.                         "IFF-AIFF"
  121.                         "IFF-SMUS"
  122.                         "In Stereo!"
  123.                     )
  124.                 )
  125.             )
  126.  
  127.             (set playflag3
  128.                 (askoptions
  129.                     (prompt "Which external players do you want to install in "
  130.                             "your \"LIBS:APlayer\" drawer?")
  131.                     (help @askoptions-help)
  132.                     (choices
  133.                         "JamCracker"
  134.                         "Major Tom"
  135.                         "Maniacs of Noise"
  136.                         "MED"
  137.                         "MultiTracker"
  138.                         "Music Assembler"
  139.                         "Noise Packer 2.0"
  140.                         "Noise Packer 3.0"
  141.                     )
  142.                 )
  143.             )
  144.  
  145.             (set playflag4
  146.                 (askoptions
  147.                     (prompt "Which external players do you want to install in "
  148.                             "your \"LIBS:APlayer\" drawer?")
  149.                     (help @askoptions-help)
  150.                     (choices
  151.                         "OctaMed"
  152.                         "Oktalyzer"
  153.                         "Puma Tracker"
  154.                         "Quadra Composer"
  155.                         "RIFF-WAVE"
  156.                         "Ron Klaren"
  157.                         "ScreamTracker 3.0"
  158.                         "SID"
  159.                     )
  160.                 )
  161.             )
  162.  
  163.             (set playflag5
  164.                 (askoptions
  165.                     (prompt "Which external players do you want to install in "
  166.                             "your \"LIBS:APlayer\" drawer?")
  167.                     (help @askoptions-help)
  168.                     (choices
  169.                         "SidMon 1.0"
  170.                         "SidMon 2.0"
  171.                         "Sonic Arranger"
  172.                         "Sound Control"
  173.                         "Sound FX 1.3"
  174.                         "Sound FX 2.0"
  175.                         "Sound Monitor 2.0"
  176.                         "StarTrekker 4"
  177.                     )
  178.                 )
  179.             )
  180.  
  181.             (set playflag6
  182.                 (askoptions
  183.                     (prompt "Which external players do you want to install in "
  184.                             "your \"LIBS:APlayer\" drawer?")
  185.                     (help @askoptions-help)
  186.                     (choices
  187.                         "StarTrekker 4AM"
  188.                         "Synthesis"
  189.                         "TakeTracker"
  190.                         "TFMX 1.5"
  191.                         "TFMX 7-Voices"
  192.                         "TFMX Professional"
  193.                         "The Musical Enlightenment"
  194.                         "Tronic Tracker"
  195.                     )
  196.                 )
  197.             )
  198.  
  199.             (set playflag7
  200.                 (askoptions
  201.                     (prompt "Which external players do you want to install in "
  202.                             "your \"LIBS:APlayer\" drawer?")
  203.                     (help @askoptions-help)
  204.                     (choices
  205.                         "Vector Dean"
  206.                         "Whittaker"
  207.                     )
  208.                 )
  209.             )
  210.         )
  211.     )
  212.  
  213.  
  214.     (set noteplay
  215.         (askbool
  216.             (prompt "Do you want to install external NotePlayers?")
  217.             (help "If you select yes, you can select between all the "
  218.                   "external NotePlayers this version support. All the "
  219.                   "NotePlayers will be stored in your \"LIBS:APlayer\" drawer.")
  220.         )
  221.     )
  222.  
  223.     (set noteplayflag1 0)
  224.     (if noteplay
  225.         (
  226.             (set noteplayflag1
  227.                 (askoptions
  228.                     (prompt "Which external NotePlayers do you want to install in "
  229.                             "your \"LIBS:APlayer/NotePlayers\" drawer?")
  230.                     (help @askoptions-help)
  231.                     (choices
  232.                         "14 Bit Stereo - 32 Voices"
  233.                         "FastMem - 4 Voices"
  234.                         "Mono - 32 Voices"
  235.                         "Real Surround - 32 Voices"
  236.                         "Stereo - 32 Voices"
  237.                         "Surround - 32 Voices"
  238.                     )
  239.                 )
  240.             )
  241.         )
  242.     )
  243.  
  244.  
  245.     (set libs
  246.         (askoptions
  247.             (prompt "Which other libraries do you want to install in your "
  248.                     "\"LIBS:\" drawer?  Press help for more info.")
  249.             (help "This is some libraries the APlayer uses or can use. "
  250.                   "Here follow a little description of the different "
  251.                   "libraries:\n\n"
  252.                   "PlaySID.library: This library are used in the SID "
  253.                   "player. That means, if you want to hear some C64 SID "
  254.                   "tunes, you have to install this library.\n\n"
  255.                   "Powerpacker.library: APlayer can use this library to "
  256.                   "decrunch powerpacked modules.\n\n"
  257.                   "Reqtools.library: This library is required by APlayer. "
  258.                   "With this library APlayer shows filerequesters etc.\n\n"
  259.                   "Rexxtools.library: If you want ARexx in APlayer, you "
  260.                   "have to install this library. It helps APlayer to make "
  261.                   "the ARexx interface.\n\n"
  262.                   "Xpkmaster.library: APlayer can also use this library to "
  263.                   "decrunch both powerpacked and xpk packed modules.\n\n"
  264.                   "Unpack.library: This library can decrunch a lot of "
  265.                   "different types of crunched modules. See the unpack.doc "
  266.                   "for more information.")
  267.             (choices
  268.                 "PlaySID.library"
  269.                 "Powerpacker.library"
  270.                 "Reqtools.library"
  271.                 "Rexxtools.library"
  272.                 "Xpkmaster.library"
  273.                 "Unpack.library"
  274.             )
  275.         )
  276.     )
  277.  
  278.  
  279.     (set cpu (database "cpu"))
  280.     (if (< cpu 68020)
  281.         (set marked 3)
  282.         (set marked 5)
  283.     )
  284.  
  285.     (set xpk
  286.         (askoptions
  287.             (prompt "Which xpk libraries do you want to install in your "
  288.                     "\"LIBS:compressors\" drawer?")
  289.             (help @askoptions-help)
  290.             (choices
  291.                 "xpkSMPL.library"
  292.                 "xpkSQSH.library (68000)"
  293.                 "XpkSQSH.library (68020)"
  294.             (default marked)
  295.             )
  296.         )
  297.     )
  298.  
  299.  
  300.     (set bonus
  301.         (askbool
  302.             (prompt "Do you want to install some bonus programs?")
  303.             (help @askbool-help)
  304.         )
  305.     )
  306.  
  307.     (set bonusflag 0)
  308.     (if bonus
  309.         (
  310.             (set bonusflag
  311.                 (askoptions
  312.                     (prompt "Which bonus programs do you want to install?")
  313.                     (help @askoptions-help)
  314.                     (choices
  315.                         "FSS2APML - Converts from FSS to APML file"
  316.                         "FSSOptimizer - Optimize your FSS file"
  317.                     )
  318.                 )
  319.             )
  320.         )
  321.     )
  322.  
  323.  
  324.     (set arexx
  325.         (askbool
  326.             (prompt "Do you want to install ARexx?")
  327.             (help @askbool-help)
  328.         )
  329.     )
  330.  
  331.  
  332.     (set doc
  333.         (askbool
  334.             (prompt "Do you want to install docs?")
  335.             (help "If you select yes, you can select between all the "
  336.                   "different docs. All the docs will be install in the "
  337.                   "\"APlayer/Docs\" drawer.")
  338.         )
  339.     )
  340.  
  341.     (set docflag 0)
  342.     (if doc
  343.         (set docflag
  344.             (askoptions
  345.                 (prompt "Which files do you want to install in the "
  346.                         "\"APlayer/Docs\" drawer?")
  347.                 (help @askoptions-help)
  348.                 (choices
  349.                     "APlayer.guide"
  350.                     "Bonus.doc"
  351.                     "MissingModules.txt"
  352.                     "PlaySid.doc"
  353.                     "SMPL.doc"
  354.                     "SQSH.doc"
  355.                     "Unpack.doc"
  356.                     "RegistrationForm"
  357.                     "Installer Script"
  358.                 )
  359.             )
  360.         )
  361.     )
  362.  
  363.  
  364.     (set developer
  365.         (askbool
  366.             (prompt "Do you want to install the developer set?")
  367.             (help @askbool-help)
  368.         )
  369.     )
  370.  
  371. ; ** Begin to copy the files
  372.  
  373.     (set @default-dest (tackon @default-dest "APlayer"))
  374.     (set lhex (tackon sdir "c/lhex"))
  375.     (set tempdir "T:apTemp")
  376.     (set deldir tempdir)
  377.  
  378.     (makedir tempdir)
  379.     (makedir @default-dest)
  380.  
  381.     (copyfiles                             ;Copy Icon To APlayer Directory
  382.         (source (tackon sdir "/APlayer.info"))
  383.         (dest (tackon @default-dest "/"))
  384.     )
  385.  
  386.     (if fileflag
  387.         (
  388.             (if (in fileflag 0)                     ;APlayer File
  389.                 (
  390.                     (copyfiles
  391.                         (source (tackon sdir "APlayer"))
  392.                         (dest @default-dest)
  393.                         (infos)
  394.                     )
  395.                 )
  396.             )
  397.  
  398.             (if (in fileflag 1)                     ;Commercial Picture
  399.                 (
  400.                     (copyfiles
  401.                         (source (tackon sdir "ShowMe.jpg"))
  402.                         (dest @default-dest)
  403.                         (infos)
  404.                     )
  405.                 )
  406.             )
  407.  
  408.             (if (in fileflag 2)                     ;Sheep Module
  409.                 (
  410.                     (copyfiles
  411.                         (source (tackon sdir "MOD.Sheeps"))
  412.                         (dest @default-dest)
  413.                         (infos)
  414.                     )
  415.                 )
  416.             )
  417.  
  418.         )
  419.     )
  420.     (complete 10)
  421.  
  422.  
  423.     (if (or (or (or (or (or (or playflag1 playflag2) playflag3) playflag4) playflag5) playflag6) playflag7)
  424.         (
  425.             (makedir "LIBS:APlayer")
  426.             (working "Unpacking player archive....")
  427.             (run ("\"%s\" -fqw=%s x Files/Players.lha >NIL:" lhex tempdir))
  428.             (set libdest "LIBS:APlayer/")
  429.             (delete "LIBS:APlayer/apHolyNoise.library")
  430.  
  431.             (if playflag1
  432.                 (
  433.                     (if (in playflag1 0)
  434.                         (
  435.                             (set libname "apActionAmics.library")
  436.                             (InstallLib)
  437.                         )
  438.                     )
  439.  
  440.                     (if (in playflag1 1)
  441.                         (
  442.                             (set libname "apDeliCustom.library")
  443.                             (InstallLib)
  444.                         )
  445.                     )
  446.  
  447.                     (if (in playflag1 2)
  448.                         (
  449.                             (set libname "apDigitalMugician.library")
  450.                             (InstallLib)
  451.                         )
  452.                     )
  453.  
  454.                     (if (in playflag1 3)
  455.                         (
  456.                             (set libname "apDSS.library")
  457.                             (InstallLib)
  458.                         )
  459.                     )
  460.  
  461.                     (if (in playflag1 4)
  462.                         (
  463.                             (set libname "apFastTracker.library")
  464.                             (InstallLib)
  465.                         )
  466.                     )
  467.  
  468.                     (if (in playflag1 5)
  469.                         (
  470.                             (set libname "apFastTracker20.library")
  471.                             (InstallLib)
  472.                         )
  473.                     )
  474.  
  475.                     (if (in playflag1 6)
  476.                         (
  477.                             (set libname "apFred.library")
  478.                             (InstallLib)
  479.                         )
  480.                     )
  481.  
  482.                     (if (in playflag1 7)
  483.                         (
  484.                             (set libname "apFTM.library")
  485.                             (InstallLib)
  486.                         )
  487.                     )
  488.                 )
  489.             )
  490.             (complete 11)
  491.  
  492.             (if playflag2
  493.                 (
  494.                     (if (in playflag2 0)
  495.                         (
  496.                             (set libname "apFuture13.library")
  497.                             (InstallLib)
  498.                         )
  499.                     )
  500.  
  501.                     (if (in playflag2 1)
  502.                         (
  503.                             (set libname "apFuture14.library")
  504.                             (InstallLib)
  505.                         )
  506.                     )
  507.  
  508.                     (if (in playflag2 2)
  509.                         (
  510.                             (set libname "apHippel-COSO.library")
  511.                             (InstallLib)
  512.                         )
  513.                     )
  514.  
  515.                     (if (in playflag2 3)
  516.                         (
  517.                             (set libname "apHippel.library")
  518.                             (InstallLib)
  519.                         )
  520.                     )
  521.  
  522.                     (if (in playflag2 4)
  523.                         (
  524.                             (set libname "apIFF-8SVX.library")
  525.                             (InstallLib)
  526.                         )
  527.                     )
  528.  
  529.                     (if (in playflag2 5)
  530.                         (
  531.                             (set libname "apIFF-AIFF.library")
  532.                             (InstallLib)
  533.                         )
  534.                     )
  535.  
  536.                     (if (in playflag2 6)
  537.                         (
  538.                             (set libname "apIFF-SMUS.library")
  539.                             (InstallLib)
  540.                         )
  541.                     )
  542.  
  543.                     (if (in playflag2 7)
  544.                         (
  545.                             (set libname "apInStereo!.library")
  546.                             (InstallLib)
  547.                         )
  548.                     )
  549.                 )
  550.             )
  551.             (complete 13)
  552.  
  553.             (if playflag3
  554.                 (
  555.                     (if (in playflag3 0)
  556.                         (
  557.                             (set libname "apJamCracker.library")
  558.                             (InstallLib)
  559.                         )
  560.                     )
  561.  
  562.                     (if (in playflag3 1)
  563.                         (
  564.                             (set libname "apMajorTom.library")
  565.                             (InstallLib)
  566.                         )
  567.                     )
  568.  
  569.                     (if (in playflag3 2)
  570.                         (
  571.                             (set libname "apMON.library")
  572.                             (InstallLib)
  573.                         )
  574.                     )
  575.  
  576.                     (if (in playflag3 3)
  577.                         (
  578.                             (set libname "apMED.library")
  579.                             (InstallLib)
  580.                         )
  581.                     )
  582.  
  583.                     (if (in playflag3 4)
  584.                         (
  585.                             (set libname "apMultiTracker.library")
  586.                             (InstallLib)
  587.                         )
  588.                     )
  589.  
  590.                     (if (in playflag3 5)
  591.                         (
  592.                             (set libname "apMusicAss.library")
  593.                             (InstallLib)
  594.                         )
  595.                     )
  596.  
  597.                     (if (in playflag3 6)
  598.                         (
  599.                             (set libname "apNoisePacker20.library")
  600.                             (InstallLib)
  601.                         )
  602.                     )
  603.  
  604.                     (if (in playflag3 7)
  605.                         (
  606.                             (set libname "apNoisePacker30.library")
  607.                             (InstallLib)
  608.                         )
  609.                     )
  610.                 )
  611.             )
  612.             (complete 14)
  613.  
  614.             (if playflag4
  615.                 (
  616.                     (if (in playflag4 0)
  617.                         (
  618.                             (set libname "apOctaMed.library")
  619.                             (InstallLib)
  620.                         )
  621.                     )
  622.  
  623.                     (if (in playflag4 1)
  624.                         (
  625.                             (set libname "apOktalyzer.library")
  626.                             (InstallLib)
  627.                         )
  628.                     )
  629.  
  630.                     (if (in playflag4 2)
  631.                         (
  632.                             (set libname "apPumaTracker.library")
  633.                             (InstallLib)
  634.                         )
  635.                     )
  636.  
  637.                     (if (in playflag4 3)
  638.                         (
  639.                             (set libname "apQuadraComposer.library")
  640.                             (InstallLib)
  641.                         )
  642.                     )
  643.  
  644.                     (if (in playflag4 4)
  645.                         (
  646.                             (set libname "apRIFF-WAVE.library")
  647.                             (InstallLib)
  648.                         )
  649.                     )
  650.  
  651.                     (if (in playflag4 5)
  652.                         (
  653.                             (set libname "apRonKlaren.library")
  654.                             (InstallLib)
  655.                         )
  656.                     )
  657.  
  658.                     (if (in playflag4 6)
  659.                         (
  660.                             (set libname "apScreamTracker30.library")
  661.                             (InstallLib)
  662.                         )
  663.                     )
  664.  
  665.                     (if (in playflag4 7)
  666.                         (
  667.                             (set libname "apSID.library")
  668.                             (InstallLib)
  669.                         )
  670.                     )
  671.                 )
  672.             )
  673.             (complete 16)
  674.  
  675.             (if playflag5
  676.                 (
  677.                     (if (in playflag5 0)
  678.                         (
  679.                             (set libname "apSidMon10.library")
  680.                             (InstallLib)
  681.                         )
  682.                     )
  683.  
  684.                     (if (in playflag5 1)
  685.                         (
  686.                             (set libname "apSidMon20.library")
  687.                             (InstallLib)
  688.                         )
  689.                     )
  690.  
  691.                     (if (in playflag5 2)
  692.                         (
  693.                             (set libname "apSonicArranger.library")
  694.                             (InstallLib)
  695.                         )
  696.                     )
  697.  
  698.                     (if (in playflag5 3)
  699.                         (
  700.                             (set libname "apSoundControl.library")
  701.                             (InstallLib)
  702.                         )
  703.                     )
  704.  
  705.                     (if (in playflag5 4)
  706.                         (
  707.                             (set libname "apSoundFX13.library")
  708.                             (InstallLib)
  709.                         )
  710.                     )
  711.  
  712.                     (if (in playflag5 5)
  713.                         (
  714.                             (set libname "apSoundFX20.library")
  715.                             (InstallLib)
  716.                         )
  717.                     )
  718.  
  719.                     (if (in playflag5 6)
  720.                         (
  721.                             (set libname "apSoundMon20.library")
  722.                             (InstallLib)
  723.                         )
  724.                     )
  725.  
  726.                     (if (in playflag5 7)
  727.                         (
  728.                             (set libname "apStarTrekker4.library")
  729.                             (InstallLib)
  730.                         )
  731.                     )
  732.                 )
  733.             )
  734.             (complete 17)
  735.  
  736.             (if playflag6
  737.                 (
  738.                     (if (in playflag6 0)
  739.                         (
  740.                             (set libname "apStarTrekker4AM.library")
  741.                             (InstallLib)
  742.                         )
  743.                     )
  744.  
  745.                     (if (in playflag6 1)
  746.                         (
  747.                             (set libname "apSynthesis.library")
  748.                             (InstallLib)
  749.                         )
  750.                     )
  751.  
  752.                     (if (in playflag6 2)
  753.                         (
  754.                             (set libname "apTakeTracker.library")
  755.                             (InstallLib)
  756.                         )
  757.                     )
  758.  
  759.                     (if (in playflag6 3)
  760.                         (
  761.                             (set libname "apTFMX_15.library")
  762.                             (InstallLib)
  763.                         )
  764.                     )
  765.  
  766.                     (if (in playflag6 4)
  767.                         (
  768.                             (set libname "apTFMX_7V.library")
  769.                             (InstallLib)
  770.                         )
  771.                     )
  772.  
  773.                     (if (in playflag6 5)
  774.                         (
  775.                             (set libname "apTFMX_Pro.library")
  776.                             (InstallLib)
  777.                         )
  778.                     )
  779.  
  780.                     (if (in playflag6 6)
  781.                         (
  782.                             (set libname "apTME.library")
  783.                             (InstallLib)
  784.                         )
  785.                     )
  786.  
  787.                     (if (in playflag6 7)
  788.                         (
  789.                             (set libname "apTronicTracker.library")
  790.                             (InstallLib)
  791.                         )
  792.                     )
  793.                 )
  794.             )
  795.             (complete 19)
  796.  
  797.             (if playflag7
  798.                 (
  799.                     (if (in playflag7 0)
  800.                         (
  801.                             (set libname "apVectorDean.library")
  802.                             (InstallLib)
  803.                         )
  804.                     )
  805.  
  806.                     (if (in playflag7 1)
  807.                         (
  808.                             (set libname "apWhittaker.library")
  809.                             (InstallLib)
  810.                         )
  811.                     )
  812.                 )
  813.             )
  814.         (DeleteAll)
  815.         )
  816.     )
  817.     (complete 20)
  818.  
  819.  
  820.     (if noteplayflag1
  821.         (
  822.             (makedir "LIBS:APlayer/NotePlayers")
  823.             (working "Unpacking NotePlayer archive....")
  824.             (run ("\"%s\" -fqw=%s x Files/NotePlayers.lha >NIL:" lhex tempdir))
  825.             (set libdest "LIBS:APlayer/NotePlayers")
  826.  
  827.             (if (in noteplayflag1 0)
  828.                 (
  829.                     (set libname "an14BitStereo-32Voices.library")
  830.                     (InstallLib)
  831.                 )
  832.             )
  833.  
  834.             (if (in noteplayflag1 1)
  835.                 (
  836.                     (set libname "anFastMem-4Voices.library")
  837.                     (InstallLib)
  838.                 )
  839.             )
  840.  
  841.             (if (in noteplayflag1 2)
  842.                 (
  843.                     (set libname "anMono-32Voices.library")
  844.                     (InstallLib)
  845.                 )
  846.             )
  847.  
  848.             (if (in noteplayflag1 3)
  849.                 (
  850.                     (set libname "anReSurround-32Voices.library")
  851.                     (InstallLib)
  852.                 )
  853.             )
  854.  
  855.             (if (in noteplayflag1 4)
  856.                 (
  857.                     (set libname "anStereo-32Voices.library")
  858.                     (InstallLib)
  859.                 )
  860.             )
  861.  
  862.             (if (in noteplayflag1 5)
  863.                 (
  864.                     (set libname "anSurround-32Voices.library")
  865.                     (InstallLib)
  866.                 )
  867.             )
  868.         (DeleteAll)
  869.         )
  870.     )
  871.     (complete 30)
  872.  
  873.  
  874.     (if libs
  875.         (
  876.             (working "Unpacking library archive....")
  877.             (run ("\"%s\" -fqw=%s x Files/Libraries.lha >NIL:" lhex tempdir))
  878.             (set libdest "LIBS:")
  879.  
  880.             (if (in libs 0)
  881.                 (
  882.                     (set libname "playsid.library")
  883.                     (InstallLib)
  884.                 )
  885.             )
  886.  
  887.             (if (in libs 1)
  888.                 (
  889.                     (set libname "powerpacker.library")
  890.                     (InstallLib)
  891.                 )
  892.             )
  893.  
  894.             (if (in libs 2)
  895.                 (
  896.                     (set libname "reqtools.library")
  897.                     (InstallLib)
  898.                 )
  899.             )
  900.  
  901.             (if (in libs 3)
  902.                 (
  903.                     (set libname "rexxtools.library")
  904.                     (InstallLib)
  905.                 )
  906.             )
  907.  
  908.             (if (in libs 4)
  909.                 (
  910.                     (set libname "xpkmaster.library")
  911.                     (InstallLib)
  912.                 )
  913.             )
  914.  
  915.             (if (in libs 5)
  916.                 (
  917.                     (set libname "unpack.library")
  918.                     (InstallLib)
  919.                 )
  920.             )
  921.         (DeleteAll)
  922.         )
  923.     )
  924.     (complete 40)
  925.  
  926.  
  927.     (if xpk
  928.         (
  929.             (makedir "LIBS:compressors")
  930.             (working "Unpacking XPK-Subs archive....")
  931.             (run ("\"%s\" -fqw=%s x Files/XPKSubs.lha >NIL:" lhex tempdir))
  932.             (set libdest "LIBS:compressors/")
  933.  
  934.             (if (in xpk 0)
  935.                 (
  936.                     (set libname "xpkSMPL.library")
  937.                     (InstallLib)
  938.                 )
  939.             )
  940.  
  941.             (if (in xpk 1)
  942.                 (
  943.                     (working ("Testing compressors/xpkSQSH.library"))
  944.                     (copylib
  945.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  946.                         (help @copylib-help)
  947.                         (source (tackon tempdir "xpkSQSH000.library"))
  948.                         (dest libdest)
  949.                         (newname "xpkSQSH.library")
  950.                         (confirm)
  951.                     )
  952.                 )
  953.             )
  954.  
  955.             (if (in xpk 2)
  956.                 (
  957.                     (working ("Testing compressors/xpkSQSH.library"))
  958.                     (copylib
  959.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  960.                         (help @copylib-help)
  961.                         (source (tackon tempdir "xpkSQSH020.library"))
  962.                         (dest libdest)
  963.                         (newname "xpkSQSH.library")
  964.                         (confirm)
  965.                     )
  966.                 )
  967.             )
  968.         (DeleteAll)
  969.         )
  970.     )
  971.     (complete 50)
  972.  
  973.  
  974.     (if bonusflag
  975.         (
  976.             (set bonusdir (tackon @default-dest "Bonus"))
  977.             (makedir bonusdir)
  978.             (working "Unpacking Bonus archive....")
  979.             (run ("\"%s\" -fqw=%s x Files/Bonus.lha >NIL:" lhex tempdir))
  980.  
  981.             (if (in bonusflag 0)
  982.                 (
  983.                     (copyfiles
  984.                         (source (tackon tempdir "FSS2APML"))
  985.                         (dest bonusdir)
  986.                     )
  987.                 )
  988.             )
  989.  
  990.             (if (in bonusflag 1)
  991.                 (
  992.                     (copyfiles
  993.                         (source (tackon tempdir "FSSOptimizer"))
  994.                         (dest bonusdir)
  995.                     )
  996.                 )
  997.             )
  998.         (DeleteAll)
  999.         )
  1000.     )
  1001.     (complete 60)
  1002.  
  1003.  
  1004.     (if arexx
  1005.         (
  1006.             (set arexxdir (tackon @default-dest "ARexx"))
  1007.             (makedir arexxdir)
  1008.             (working "Unpacking ARexx archive....")
  1009.             (run ("\"%s\" -fqw=%s x Files/ARexx.lha >NIL:" lhex arexxdir))
  1010.         )
  1011.     )
  1012.     (complete 70)
  1013.  
  1014.  
  1015.     (if doc
  1016.         (
  1017.             (set docdir (tackon @default-dest "Docs"))
  1018.             (makedir (tackon @default-dest "Docs"))
  1019.             (copyfiles
  1020.                 (source (tackon sdir "Docs.info")) ;Copy Icon To Docs Directory
  1021.                 (dest @default-dest)
  1022.             )
  1023.  
  1024.             (working "Unpacking Docs archive....")
  1025.             (run ("\"%s\" -fqw=%s x Files/Docs.lha >NIL:" lhex tempdir))
  1026.  
  1027.             (if (in docflag 0)
  1028.                 (
  1029.                     (copyfiles
  1030.                         (source (tackon sdir "Docs/APlayer.guide"))
  1031.                         (dest (tackon @default-dest "Docs"))
  1032.                         (infos)
  1033.                     )
  1034.                 )
  1035.             )
  1036.  
  1037.             (if (in docflag 1)
  1038.                 (
  1039.                     (copyfiles
  1040.                         (source (tackon tempdir "Bonus.doc"))
  1041.                         (dest docdir)
  1042.                         (infos)
  1043.                     )
  1044.                 )
  1045.             )
  1046.  
  1047.             (if (in docflag 2)
  1048.                 (
  1049.                     (copyfiles
  1050.                         (source (tackon tempdir "MissingModules.txt"))
  1051.                         (dest docdir)
  1052.                         (infos)
  1053.                     )
  1054.                 )
  1055.             )
  1056.  
  1057.             (if (in docflag 3)
  1058.                 (
  1059.                     (copyfiles
  1060.                         (source (tackon tempdir "PlaySid.doc"))
  1061.                         (dest docdir)
  1062.                         (infos)
  1063.                     )
  1064.                 )
  1065.             )
  1066.  
  1067.             (if (in docflag 4)
  1068.                 (
  1069.                     (copyfiles
  1070.                         (source (tackon tempdir "SMPL.doc"))
  1071.                         (dest docdir)
  1072.                         (infos)
  1073.                     )
  1074.                 )
  1075.             )
  1076.  
  1077.             (if (in docflag 5)
  1078.                 (
  1079.                     (copyfiles
  1080.                         (source (tackon tempdir "SQSH.doc"))
  1081.                         (dest docdir)
  1082.                         (infos)
  1083.                     )
  1084.                 )
  1085.             )
  1086.  
  1087.             (if (in docflag 6)
  1088.                 (
  1089.                     (copyfiles
  1090.                         (source (tackon tempdir "Unpack.doc"))
  1091.                         (dest docdir)
  1092.                         (infos)
  1093.                     )
  1094.                 )
  1095.             )
  1096.  
  1097.             (if (in docflag 7)
  1098.                 (
  1099.                     (copyfiles
  1100.                         (source (tackon tempdir "RegistrationForm"))
  1101.                         (dest docdir)
  1102.                         (infos)
  1103.                     )
  1104.                 )
  1105.             )
  1106.  
  1107.             (if (in docflag 8)
  1108.                 (
  1109.                     (copyfiles
  1110.                         (source (tackon sdir "HDInstall"))
  1111.                         (dest @default-dest)
  1112.                         (infos)
  1113.                     )
  1114.                 )
  1115.             )
  1116.         (DeleteAll)
  1117.         )
  1118.     )
  1119.     (complete 80)
  1120.  
  1121.  
  1122.     (if developer
  1123.         (
  1124.             (set devdir (tackon @default-dest "Developer"))
  1125.             (makedir devdir)
  1126.             (working "Unpacking Developer archive....")
  1127.             (run ("\"%s\" -fqw=%s x Files/Developer.lha >NIL:" lhex devdir))
  1128.         )
  1129.     )
  1130.     (complete 90)
  1131.  
  1132. ; Fix the configuration files
  1133.  
  1134.     (set flag 0)
  1135.     (if (exists "ENVARC:APlayer/")
  1136.         (
  1137.             (makedir "ENVARC:APlayer/Players")
  1138.             (makedir "ENVARC:APlayer/NotePlayers")
  1139.  
  1140.             (if (exists "ENVARC:APlayer/IFF-8SVX.cfg")
  1141.                 (
  1142.                     (copyfiles
  1143.                         (source "ENVARC:APlayer/IFF-8SVX.cfg")
  1144.                         (dest "ENVARC:APlayer/Players/")
  1145.                     )
  1146.                     (delete "ENVARC:APlayer/IFF-8SVX.cfg")
  1147.                     (set flag 1)
  1148.                 )
  1149.             )
  1150.  
  1151.             (if (exists "ENVARC:APlayer/RIFF-WAVE.cfg")
  1152.                 (
  1153.                     (copyfiles
  1154.                         (source "ENVARC:APlayer/RIFF-WAVE.cfg")
  1155.                         (dest "ENVARC:APlayer/Players/")
  1156.                     )
  1157.                     (delete "ENVARC:APlayer/RIFF-WAVE.cfg")
  1158.                     (set flag 1)
  1159.                 )
  1160.             )
  1161.  
  1162.             (if (exists "ENVARC:APlayer/Protracker.cfg")
  1163.                 (
  1164.                     (delete "ENVARC:APlayer/Protracker.cfg")
  1165.                     (set flag 1)
  1166.                 )
  1167.             )
  1168.  
  1169.             (if (exists "ENVARC:APlayer/Players/Protracker.cfg")
  1170.                 (
  1171.                     (delete "ENVARC:APlayer/Players/Protracker.cfg")
  1172.                     (set flag 1)
  1173.                 )
  1174.             )
  1175.         )
  1176.     )
  1177.     (complete 100)
  1178.     (delete deldir)
  1179.  
  1180.     (if flag
  1181.         (message "You have to reset your computer before using APlayer.")
  1182.     )
  1183. )
  1184.  
  1185. ;--------------------------------------------------------------------------
  1186. ; ** Remove Procedure
  1187.  
  1188. (procedure Remove
  1189.     (if (askbool
  1190.             (prompt "This procedure will remove all files associated to "
  1191.                     "the APlayer program. This means the program, docs, "
  1192.                     "preference files and all extern players.\n\n"
  1193.                     "Are you sure you want to continue?")
  1194.             (help "")
  1195.         )
  1196.  
  1197.         (
  1198.             (set @default-dest
  1199.                 (askdir
  1200.                     (prompt "Select where the \"APlayer\" drawer are "
  1201.                             "stored.")
  1202.                     (help @askdir-help)
  1203.                     (default @default-dest)
  1204.                 )
  1205.             )
  1206.  
  1207.             (working "Deleting the \"APlayer\" drawer...")
  1208.             (set ddir (tackon @default-dest "APlayer"))
  1209.  
  1210.             (set deldir (tackon ddir "ARexx"))
  1211.             (DeleteAll)
  1212.  
  1213.             (set deldir (tackon ddir "Bonus"))
  1214.             (DeleteAll)
  1215.  
  1216.             (set deldir (tackon ddir "Docs"))
  1217.             (DeleteAll)
  1218.  
  1219.             (set deldir (tackon ddir "Developer/Examples"))
  1220.             (DeleteAll)
  1221.             (set deldir (tackon ddir "Developer/Include3.0/Own"))
  1222.             (DeleteAll)
  1223.             (set deldir (tackon ddir "Developer/Include3.0"))
  1224.             (DeleteAll)
  1225.             (set deldir (tackon ddir "Developer"))
  1226.             (DeleteAll)
  1227.  
  1228.             (set deldir ddir)
  1229.             (DeleteAll)
  1230.  
  1231.             (delete ddir)
  1232.             (delete (tackon @default-dest "APlayer.info"))
  1233.  
  1234.             (delete "S:APlayer.FSS")
  1235.             (complete 25)
  1236.  
  1237.  
  1238.             (working "Deleting preference files...")
  1239.             (set ddir "ENVARC:APlayer")
  1240.  
  1241.             (set deldir (tackon ddir "Players"))
  1242.             (DeleteAll)
  1243.             (set deldir (tackon ddir "NotePlayers"))
  1244.             (DeleteAll)
  1245.             (set deldir ddir)
  1246.             (DeleteAll)
  1247.             (delete "ENVARC:APlayer")
  1248.             (complete 50)
  1249.  
  1250.             (working "Deleting external NotePlayers...")
  1251.             (set deldir "LIBS:APlayer/NotePlayers")
  1252.             (DeleteAll)
  1253.             (delete "LIBS:APlayer/NotePlayers")
  1254.             (complete 75)
  1255.  
  1256.             (working "Deleting external players...")
  1257.             (set deldir "LIBS:APlayer")
  1258.             (DeleteAll)
  1259.             (delete "LIBS:APlayer")
  1260.             (complete 100)
  1261.         )
  1262.     )
  1263. )
  1264.  
  1265. ;--------------------------------------------------------------------------
  1266. ; ** Main Stript
  1267.  
  1268. (complete 0)
  1269. (set sdir (pathonly @icon))
  1270.  
  1271. (if (< (/ (getversion) 65536) 37)
  1272.     (abort "You must have Kickstart 2.0 or greater to use this installation"
  1273.            " utility and to run \"Accessible Player\".")
  1274. )
  1275.  
  1276. (message "This installer script will help you to install/remove "
  1277.          "\"Accessible Player\" to/from your hard disk.\n"
  1278.          "If you don't own one, abort immediately.")
  1279.  
  1280. (welcome)
  1281.  
  1282.  
  1283. ; ** Ask to Install Or Remove
  1284.  
  1285. (set askflag (askbool
  1286.                 (prompt "Do you want to install or remove "
  1287.                         "\"Accessible Player\"?")
  1288.                 (help "")
  1289.                 (choices "Install" "Remove")
  1290.              )
  1291. )
  1292.  
  1293. (if askflag
  1294.     (Install)                       ;Start Install Procedure
  1295.     (Remove)                        ;Start Remove Procedure
  1296. )
  1297.